package com.hncc.sms.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hncc.sms.mapper.SysUserManagerMapper;
import com.hncc.sms.domain.SysUserManager;
import com.hncc.sms.service.ISysUserManagerService;

/**
 * 用户信息Service业务层处理
 * 
 * @author HYJ
 * @date 2020-08-27
 */
@Service
public class SysUserManagerServiceImpl implements ISysUserManagerService 
{
    @Autowired
    private SysUserManagerMapper sysUserManagerMapper;

    /**
     * 查询用户信息
     * 
     * @param userId 用户信息ID
     * @return 用户信息
     */
    @Override
    public SysUserManager selectSysUserManagerById(Long userId)
    {
        return sysUserManagerMapper.selectSysUserManagerById(userId);
    }

    /**
     * 查询用户信息列表
     * 
     * @param sysUserManager 用户信息
     * @return 用户信息
     */
    @Override
    public List<SysUserManager> selectSysUserManagerList(SysUserManager sysUserManager)
    {
        return sysUserManagerMapper.selectSysUserManagerList(sysUserManager);
    }

    /**
     * 新增用户信息
     * 
     * @param sysUserManager 用户信息
     * @return 结果
     */
    @Override
    public int insertSysUserManager(SysUserManager sysUserManager)
    {
        sysUserManager.setCreateTime(DateUtils.getNowDate());
        return sysUserManagerMapper.insertSysUserManager(sysUserManager);
    }

    /**
     * 修改用户信息
     * 
     * @param sysUserManager 用户信息
     * @return 结果
     */
    @Override
    public int updateSysUserManager(SysUserManager sysUserManager)
    {
        sysUserManager.setUpdateTime(DateUtils.getNowDate());
        return sysUserManagerMapper.updateSysUserManager(sysUserManager);
    }

    /**
     * 批量删除用户信息
     * 
     * @param userIds 需要删除的用户信息ID
     * @return 结果
     */
    @Override
    public int deleteSysUserManagerByIds(Long[] userIds)
    {
        return sysUserManagerMapper.deleteSysUserManagerByIds(userIds);
    }

    /**
     * 删除用户信息信息
     * 
     * @param userId 用户信息ID
     * @return 结果
     */
    @Override
    public int deleteSysUserManagerById(Long userId)
    {
        return sysUserManagerMapper.deleteSysUserManagerById(userId);
    }
}
